<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>购物商城-购物车</title>
    <link rel="stylesheet" type="text/css" href="/static/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        ul {
            list-style: none;
        }

        #nav {
            height: 50px;
            background-color: #46474a;
        }

        #nav ul li {
            width: 120px;
            float: left;
        }

        #nav ul li a {
            display: block;
            width: 120px;
            height: 50px;
            line-height: 50px;
            text-decoration: none;
            font-size: 18px;
            /* font-weight: bold; */
            color: white;
            text-align: center;
        }

        #nav ul li a:hover {
            background-color: white;
            color: #46474a;
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: #f9f9f9;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            padding: 12px 16px;
            z-index: 1;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }
    </style>
    <style type="text/css">
        li.margin {
            margin-left: 50px;
        }
    </style>
</head>
<body>
<div id="nav">
    <ul>
        <li class="margin"><img src="/static/images/logo.png" style="width: 87.4px;height: 50px;"></li>
        <li><a href="{% url 'purchase_index' %}">购物商城</a></li>
        <li><a href="/moment/">车友圈</a></li>
        <li><a href="/view_power/">充电规划</a></li>
        <li><a href="/chatbot/botmain/">智能客服</a></li>
        <li><a href="/repair/">维修保养</a></li>
        {% if "info" in request.session.keys %}
        <li class="dropdown">
            <a href="#">
                我的</a>
            <div class="dropdown-content">
                <a href="{% url 'show_order' %}" style="color: #46474a;font-size: 17px;">购物订单</a>
                <a href="/repair/list/" style="color: #46474a;font-size: 17px;">维修订单</a>
                <a href="/infomation/" style="color: #46474a;font-size: 17px;">个人信息</a>
                <a href="/signout/" style="color: #46474a;font-size: 17px;">注销</a>
            </div>
        </li>

        {% else %}
        <li><a href="/signin/">登录 / 注册</a></li>
        {% endif %}
    </ul>
</div>
<div class="search_bar clearfix">
    <!-- <a href="/index/" class="logo fl"><img src="/static/images/logo.png"></a> -->
    <div class="sub_page_name fl">|&nbsp;&nbsp;&nbsp;&nbsp;购物车</div>
</div>

<div class="total_count">全部商品<em>{{ cart_goods_count }}</em>件</div>
<ul class="cart_list_th clearfix">
    <li class="col01">商品名称</li>
    <li class="col03">商品价格</li>
    <li class="col04">数量</li>
    <li class="col05">小计</li>
    <li class="col06">操作</li>
</ul>

{% for cart_goods in cart_goods_list %}
<ul class="cart_list_td clearfix">
    <li class="col01"></li>
    <li class="col02"><img src="/static/goods/{{ cart_goods.goods_img }}.jpg"></li>
    <li class="col03">{{ cart_goods.goods_name }}<br><em>{{ cart_goods.goods_price }}元</em></li>

    <li class="col05">{{ cart_goods.goods_price }}元</li>
    <li class="col06">{{ cart_goods.goods_num }}</li>
    <li class="col07">{{ cart_goods.total_money }}元</li>
    <li class="col08"><a href="{% url 'remove_cart' %}?id={{ cart_goods.id }}">删除</a></li>
</ul>
{% endfor %}

<ul class="settlements">
    <li class="col01">.</li>
    <li class="col02">.</li>
    <li class="col03">合计(不含运费)：<span>¥</span><em>{{ cart_goods_money }}</em><br>共计<b>{{ cart_goods_count }}</b>件商品</li>
    <li class="col04"><a href="{% url 'place_order' %}">去结算</a></li>
</ul>

<div class="footer">
    <div class="foot_link">
        <a href="#">关于我们</a>
        <span>|</span>
        <a href="#">联系我们</a>
        <span>|</span>
        <a href="#">招聘人才</a>
        <span>|</span>
        <a href="#">友情链接</a>
    </div>
    <p>CopyRight © 2016 信息系统高级分析师群 All Rights Reserved</p>
    <p>电话：010-****888 京ICP备*******8号</p>
</div>

</body>
</html>